<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1.0, minimum-scale=1.0">
    <title>榜单资讯</title>
    <link rel="stylesheet/less" href="./css/list.less">
    <link rel="stylesheet/less" href="./css/reset.less">
    <link rel="stylesheet/less" href="./css/common.less">
</head>

<body>
    <header>
        <div class="back"><a href="./index.html">&lt;</a></div>
        <div class="title">榜单资讯</div>
        <div></div>
    </header>
    <div class="title-content">
        <nav id="nav-box">
            <div class="item navactive"> 2016年7月 1 日</div>
            <div class="item">2016年7月15日</div>
            <div class="item">动漫总排行榜</div>
            <div class="item">动漫资讯</div>
        </nav>
        <div class="content" id="content">
            <div class="item active">
                <div class="item-content">
                    <div class="title">重返17岁</div>
                    <div class="episode">第13集</div>
                </div>
                <div class="item-content">
                    <div class="title">从零开始的异世界生活</div>
                    <div class="episode">第10集</div>
                </div>
                <div class="item-content">
                    <div class="title">剑风传奇</div>
                    <div class="episode">第10集</div>
                </div>
                <div class="item-content">
                    <div class="title">驱魔少年</div>
                    <div class="episode">第9集</div>
                </div>
                <div class="item-content">
                    <div class="title">禁忌咒文</div>
                    <div class="episode">第10集</div>
                </div>
                <div class="item-content">
                    <div class="title">忧郁的怪物庵</div>
                    <div class="episode">第10集</div>
                </div>
                <div class="item-content">
                    <div class="title">情热传说 the X</div>
                    <div class="episode">第10集</div>
                </div>
                <div class="item-content">
                    <div class="title">91天</div>
                    <div class="episode">第8集</div>
                </div>
                <div class="item-content">
                    <div class="title">亚尔斯兰战记 风尘乱舞</div>
                    <div class="episode">第8集</div>
                </div>
                <div class="item-content">
                    <div class="title">发条精灵战记 天镜的北极之星</div>
                    <div class="episode">第9集</div>
                </div>
                <div class="item-content">
                    <div class="title">SERVAMP-サーヴァンプ-</div>
                    <div class="episode">第9集</div>
                </div>
                <div class="item-content">
                    <div class="title">Rewrite</div>
                    <div class="episode">第10集</div>
                </div>
            </div>
            <div class="item">
                <div class="title">
                    暂无内容
                </div>
            </div>
            <div class="item">
                <div class="title">
                    暂无内容
                </div>
            </div>
            <div class="item">
                <div class="title">
                    暂无内容
                </div>
            </div>
        </div>
    </div>

</body>

</html>

<script src="./js/less.js"></script>
<script src="./js/common.js"></script>
<script src="./js/jquery-3.6.0.min.js"></script>
<script>
    $('#nav-box .item').click(function () {

        // 获取索引
        var index = $(this).index()

        $(this).addClass('navactive').siblings().removeClass('navactive')

        // eq => 匹配索引值 链式操作 => 面向对象编程
        $('#content .item').eq(index).addClass('active').siblings().removeClass('active')

    })
</script>